/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Máté
 */
public class Oscilloscope extends Element {

    private Boolean isHighLevel;            //bit erteket tarolo valtozo
    private Boolean isConnected;            //fel van-e csatolva az oszcilloszkop
    private List<Boolean> stateList;        //ebben a listaban taroljuk az allapotokat

    public Oscilloscope() { //konstruktor
        super(1);
        this.isConnected = false;
        this.stateList = new ArrayList<Boolean>();
    }

    public Boolean isConnected() {  // ellenorzo-beallito metodusok
        return isConnected;
    }

    public List<Boolean> getStateList() {
        return stateList;
    }

    public void setConnected(Boolean isConnected) {
        this.isConnected = isConnected;
    }

    void read(Boolean value) {      //ertek kiolvasasa
        this.isHighLevel = value;
    }

    void readSignal() {                     //ertek hozzaadasa a listahoz
        stateList.add(this.isHighLevel);
    }
}
